﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/Login',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/common',
    name: 'user',
    icon: 'user',
    access: 'canUser',
    routes: [
      {
        path: '/common/charts',
        name: 'charts',
        icon: 'bar-chart',
        component: './user/Chart',
      },
      {
        path: '/common/settings',
        name: 'settings',
        icon: 'setting',
      },
    ],
  },
  {
    path: '/admin',
    name: 'admin',
    icon: 'crown',
    access: 'canAdmin',
    // component: './Admin',
    routes: [
      {
        path: '/admin/userList',
        name: 'userList',
        component: './admin/UserList',
      },
      {
        path: '/admin/businessFirmList',
        name: 'businessFirmList',
        component: './Welcome',
      },
      {
        path: '/admin/communityManage',
        name: 'communityManage',
        component: './Welcome',
      },
      {
        path: '/admin/settings',
        name: 'settings',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'community',
    icon: 'comment',
    path: '/community',
    component: '@/layout/CommunityLayout',
    routes: [
      {
        // name: 'home',
        path: '/community/',
        // exact: true,
        component: './Community/Home',
      },
      {
        // name: 'blog',
        // exact: true,
        path: '/community/:blogId',
        component: './Community/Blog',
      },
    ],
  },
  {
    name: 'mall',
    icon: 'shop',
    access: 'canMall',
    path: '/mall',
    component: './Shop',
  },
  {
    name: 'businessFirm',
    access: 'canBusinessFirm',
    icon: 'shop',
    path: '/businessFirm',
    component: './TableList',
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
